Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

Playing With Edit Lists

A segment of a movie can be repeated without duplicating media data by using edit lists. Suppose you have a single-track movie whose media time scale is 100 and track duration is 1000 (10 seconds). For this example the movie's time scale is 600. If there are no edits in the movie, the edit atom would contain the following data values:

Atom size

36

 

Atom type

'edts'

 

 

Atom size

28

 

Atom type

'elst'

 

Version/Flags

0

 

Number of entries

1

 

Track duration

6000 (10 seconds)

 

Media time

0

 

Media rate

1.0

Because this is a single-track move, the track's duration in the track header atom is 6000, and the movie's duration in the movie header atom is 6000.

If you change the track to play the media from time 0 to time 2 seconds, and then play the media from time 0 to time 10 seconds, the edit atom would now contain these data values:

Atom size

48

 

Atom type

'edts'

 

 

Atom size

40

 

Atom type

'elst'

 

Version/Flags

0

 

Number of entries

2

 

Track duration[1]

1200 (2 seconds)

 

Media time[1]

0

 

Media rate[1]

1.0

 

Track duration[2]

6000 (10 seconds)

 

Media time[2]

0

 

Media rate[2]

1.0

Because the track is now 2 seconds longer, the track's duration in the track header atom must now be 7200, and the movie's duration in the movie header atom must also be 7200.

Currently, the media plays from time 0 to time 2, then plays from time 0 to time 10. If you take that repeated segment at the beginning (time 0 to time 2) and play it at double speed to maintain the original duration, the edit atom would now contain the following values:

Atom size

60

 

Atom type

'edts'

 

 

Atom size

52

 

Atom type

'elst'

 

Version/Flags

0

 

Number of entries

3

 

Track duration[1]

600 (1 seconds)

 

Media time[1]

0

 

Media rate[1]

2.0

 

Track duration[2]

600 (1 second)

 

Media time[2]

0

 

Media rate[2]

2.0

 

Track duration[3]

4800 (8 seconds)

 

Media time[3]

200

 

Media rate[3]

1.0

Because the track is now back to its original duration of 10 seconds, its duration in the track header atom is 6000 and the movie's duration in the movie header atom is 6000.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |